Conditions | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import Generator from './Base'; |
||
12 | generate() { |
||
13 | const alphabet = [ |
||
14 | ...'abcdefghijklmnopqrstuvwxyz', // eslint-disable-line no-secrets/no-secrets |
||
15 | ...'ABCDEFGHIJKLMNOPQRSTUVWXYZ', // eslint-disable-line no-secrets/no-secrets |
||
16 | ...'0123456789' |
||
17 | ]; |
||
18 | |||
19 | // eslint-disable-next-line no-magic-numbers |
||
20 | const len = this.fatum.int(10, 24); |
||
21 | const word = []; |
||
22 | |||
23 | for (let i = 0; i < len; i++) { |
||
24 | word.push(this.fatum.pick(alphabet)); |
||
25 | } |
||
26 | |||
27 | return word.join(''); |
||
28 | } |
||
29 | } |
||
30 |